package cn.com.cabinet.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cabinet.web.entity.Commodities;

import cn.com.cabinet.dao.CommoditiesDao;

@Service
public class CommoditiesServiceImpl {
	@Autowired
	private CommoditiesDao commoditiesDao;
	
	public void addCommodities(Commodities c){
		commoditiesDao.save(c);
	}
	
	public List<Commodities> getCommoditiesList(Long sellerId){
		return commoditiesDao.getCommoditiesList(sellerId);
	}
	
	public Commodities getCommodities(Long id){
		return commoditiesDao.findOne(id);
	}

}
